'''
Created on 2012-8-31

@author: labelvic
'''

class texas_client:
    def __init__(self, logontoken, deskid):
        self.logontoken = logontoken
        self.deskid = deskid
        self.tcpmod = None
        
    def logon(self):
        if (self.tcpmod):
            self.tcpmod.connect()
            self.tcpmod.send_data("<stream:stream><auth><logontoken>"+\
                              str(self.logontoken)+"</logontoken><deskid>"+\
                              str(self.deskid)+"</deskid></auth>")
    def ping(self):
        if (self.tcpmod):            
            self.tcpmod.ping()